﻿using System.Windows.Controls;
using System.Windows;

namespace DeepEarth.Toolkit.Controls
{
	/// <summary>
	/// This is a TreeViewItem which expand till the left end of the control.
	/// Hence multiple column of UI element can be used at the end and they would be aligned, 
	/// provided they all have the same fixed size.
	/// </summary>
	public class TreeGridViewItem : TreeViewItem
	{
		public TreeGridViewItem()
		{
			DefaultStyleKey = typeof(TreeGridViewItem);
		}

		protected override DependencyObject GetContainerForItemOverride()
		{
			return new TreeGridViewItem();
		}

		protected override bool IsItemItsOwnContainerOverride(object item)
		{
			return item is TreeGridViewItem;
		}
	}
}
